# #!/usr/bin/python
# # -*- coding:utf-8 -*-
# 登陆

# with open('user.txt','r',encoding = 'utf-8') as far:
#     ls = far.read().strip().split("\n")
#     print(ls)
import time,datetime
username_inp = input("请输入用户名：")
pwd_inp = input("请输入密码：")
i = datetime.datetime.today()
with open('user.txt','r',encoding = 'utf-8') as fr:
    # dic_name = {}
    for user_info in fr:
        username,pwd = user_info.strip().split(":")
        # print(user_info)
        if username.strip() == username_inp and pwd.strip() == pwd:
            print("登录成功程序结束，欢迎%s登陆，今天的日期是%s" %("万术成",i))
            break
        else:
            continue
    else:
        print("用户名或密码错误")